//package com.wst.system.controller;
//
//import com.alibaba.fastjson2.JSONObject;
//import com.wst.system.security.IsAdmin;
//import com.wst.system.server.service.SysTableService;
//import com.wst.system.util.ResultUtil;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.*;
//
//import java.io.IOException;
//import java.sql.SQLException;
//import java.util.List;
//import java.util.Map;
//
//
//@RestController
//@Api(tags = {"系统表操作工具"})
//@RequestMapping("sys_table")
//public class SysTableController {
//
//    @Autowired
//    private SysTableService sysTableService;
//
//    @GetMapping("/test")
//    public JSONObject test() throws SQLException, IOException {
//        sysTableService.getDataBaseAllTable();
//        return ResultUtil.successInfo();
//    }
//
//    @IsAdmin
//    @GetMapping("/gettableinfo")
//    public JSONObject getTableinfo(@RequestParam("tableName")String tableName) throws SQLException, IOException {
//        List<Map<String,Object>> mapList=sysTableService.getTableInfo(tableName);
//        return ResultUtil.successInfo(mapList);
//    }
//
//    @IsAdmin
//    @ApiOperation(value = "获取所有的表",notes = "获取所有的表")
//    @GetMapping("/getalltable")
//    public JSONObject getAllTable() throws SQLException, IOException {
//        List<String> strings=sysTableService.getDataBaseAllTable();
//        return ResultUtil.successInfo(strings);
//    }
//
//    @IsAdmin
//    @ApiOperation(value = "给表添加基础字段",notes = "给表添加基础数据")
//    @PostMapping("addBaseTable")
//    public JSONObject addBaseTable(@RequestParam("tableName")String tableName) throws SQLException, IOException {
//        sysTableService.addDataBaseByTable(tableName);
//        return ResultUtil.successInfo("添加成功");
//    }
//}
